From 55c76db7b60ae142a1d224e4d485771d7be2b51f Mon Sep 17 00:00:00 2001
From: Ilion Beyst <ilion.beyst@gmail.com>
Date: Tue, 25 Oct 2022 18:57:58 +0200
Subject: fix matches page filter params propagation

---
 web/pw-server/src/routes/matches/[match_id].svelte | 52 +++++++++++-----------
 1 file changed, 27 insertions(+), 25 deletions(-)

(limited to 'web/pw-server/src/routes/matches/[match_id].svelte')

diff --git a/web/pw-server/src/routes/matches/[match_id].svelte b/web/pw-server/src/routes/matches/[match_id].svelte
index 1d18375..bbb25e1 100644
--- a/web/pw-server/src/routes/matches/[match_id].svelte
+++ b/web/pw-server/src/routes/matches/[match_id].svelte
@@ -66,32 +66,34 @@
 
 <div class="container">
   <Visualizer {matchLog} {matchData} />
-  <div class="output-pane">
-    <div class="player-select">
-      {#if playersWithVisibleLog.length == 1}
-        <h3 class="player-log-header">
-          player log for
-          <span style:color={selectedPlayer["color"]}>{selectedPlayer.displayName}</span>
-        </h3>
-      {:else}
-        <Select
-          items={playersWithVisibleLog}
-          label="displayName"
-          clearable={false}
-          searchable={false}
-          bind:value={dropdownSelectedPlayer}
-          placeholder="Select player to see logs"
-        >
-          <div slot="item" let:item>
-            <span style:color={item.color}>{item.displayName}</span>
-          </div>
-        </Select>
-      {/if}
+  {#if playersWithVisibleLog.length > 0}
+    <div class="output-pane">
+      <div class="player-select">
+        {#if playersWithVisibleLog.length == 1}
+          <h3 class="player-log-header">
+            player log for
+            <span style:color={selectedPlayer["color"]}>{selectedPlayer.displayName}</span>
+          </h3>
+        {:else}
+          <Select
+            items={playersWithVisibleLog}
+            label="displayName"
+            clearable={false}
+            searchable={false}
+            bind:value={dropdownSelectedPlayer}
+            placeholder="Select player to see logs"
+          >
+            <div slot="item" let:item>
+              <span style:color={item.color}>{item.displayName}</span>
+            </div>
+          </Select>
+        {/if}
+      </div>
+      <div class="player-log">
+        <PlayerLog {matchLog} playerId={selectedPlayer?.["playerId"]} />
+      </div>
     </div>
-    <div class="player-log">
-      <PlayerLog {matchLog} playerId={selectedPlayer?.["playerId"]} />
-    </div>
-  </div>
+  {/if}
 </div>
 
 <style lang="scss">
-- 
cgit v1.2.3

